// 个人样本库
import request from '@/http'
import config from '@/http/config'

const apiSample = `${config.account.ip}/api/accountmgt/sampleBank/sample`
const apiBank = `${config.account.ip}/api/accountmgt/sampleBank/bank`
const apiIndexing = `${config.account.ip}/api/accountmgt/sampleBank/indexing`

// 添加样本
export const smpleAdd = (params) => request.post(`${apiSample}/add`, params)
// 新建样本库
export const bankAdd = (params) => request.post(`${apiBank}/add`, params)
// 获取样本库列表
export const bankList = (params) => request.get(`${apiBank}/list`, params)
// 删除样本库
export const bankDel = (params) => request.post(`${apiBank}/del`, params)
// 编辑样本库
export const bankEdit = (params) => request.post(`${apiBank}/edit`, params)
// 获取样本库基本信息
export const bankInfo = (params) => request.get(`${apiBank}/info`, {
  params
})
// 编辑标引
export const indexEdit = (params) => request.post(`${apiIndexing}/edit`, params)
// 添加标引
export const indexAdd = (params) => request.post(`${apiIndexing}/add`, params)
// 删除标引
export const indexDel = (params) => request.post(`${apiIndexing}/del`, params)
// 获取样本列表
export const sampleList = (params) => request.post(`${apiSample}/list`, params)
// 删除样本
export const sampleDel = (params) => request.post(`${apiSample}/del`, params)
// 获取样本信息
export const sampleInfo = (params) => request.post(`${apiSample}/info`, params)
// 添加标引内容
export const indexAddContent = (params) => request.post(`${apiIndexing}/addContent`, params)
// 标引列表
export const indexList = (params) => request.get(`${apiIndexing}/list`, {
  params
})
// 导出样本
export const smpleExport = () => request({
  method: 'post',
  url: `${apiSample}/export`,
  responseType: 'blob'
})
// 分析
export const bankAnalysis = (params) => request.get(`${apiBank}/analysis`, {
  params
})
